package com.spec.controller.system;

import com.spec.services.system.user.IUserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import sys.basic.controller.BaseController;
import sys.basic.entity.PageData;

import javax.annotation.Resource;
import java.util.List;
@Controller
@RequestMapping(value="/user")
public class UserController extends BaseController{
	
	@Resource(name="userService")
	private IUserService userService;
	
	@RequestMapping(value="/list")
	public ModelAndView find(){
		ModelAndView mv = this.getModelAndView();
		PageData pd = this.getPageData();
		List<PageData> users = userService.find(pd);
		mv.addObject("users", users);
		return mv;
	}
	
}
